package cn.powertime.evaluation.service.impl;

import cn.powertime.evaluation.entity.DbqPostings;
import cn.powertime.evaluation.mapper.DbqPostingsMapper;
import cn.powertime.evaluation.service.DbqPostingsService;
import cn.powertime.evaluation.vo.RespPersonalPostingsListVo;
import cn.powertime.evaluation.vo.WebReqPostingsSearchVo;
import cn.powertime.evaluation.vo.WebRespIndexPostingsListVo;
import cn.powertime.evaluation.vo.WebRespPostingsListVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 帖子表 服务实现类
 * </p>
 *
 * @author liqi
 * @since 2019-09-23
 */
@Service
public class DbqPostingsServiceImpl extends ServiceImpl<DbqPostingsMapper, DbqPostings> implements DbqPostingsService {

    @Autowired
    private DbqPostingsMapper dbqPostingsMapper;

    @Override
    public IPage<WebRespIndexPostingsListVo> indexList(Page page) {
        return dbqPostingsMapper.indexList(page);
    }

    @Override
    public Page<RespPersonalPostingsListVo> personalPostingsList(Page page, Long userId) {
        return this.dbqPostingsMapper.selectPersonalPostingsList(page, userId);
    }

    @Override
    public IPage<WebRespPostingsListVo> postingsList(Page page, WebReqPostingsSearchVo params) {
        return dbqPostingsMapper.postingsList(page,params);
    }

    @Override
    public Page<RespPersonalPostingsListVo> personalCollects(Page page, Long userId) {
        return this.dbqPostingsMapper.selectPersonalCollects(page, userId);
    }

}
